package com.lx.service;

import com.github.pagehelper.PageInfo;
import com.lx.entity.Category;

import java.util.List;
import java.util.Map;

public interface CategoryService {

    PageInfo<Category> getPageInfo(Map<String, Object> params);
    List<Category> getAllCategories();
    List<Category> getFirstLevelCategories();
    List<Category> getSecondLevelCategories(Integer id);
    List<Category> getThirdLevelCategories(Integer id);
    Category getCategoryById(Integer id);
    boolean addCategory(Category category);
    boolean updateCategory(Category category);
    boolean deleteCategory(Integer id);
    int selectSameName(Integer type, String name);
}
